﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GcmpLocatorCommands.h"
#include "Vector3d.h"

namespace gcmp
{
    class IActionLocatorBehavior;

    /// \brief 配置罗盘旋转 Action 的生成器 IActionCreator 的参数
    class GCMP_LOCATOR_COMMANDS_EXPORT ActionLocatorRotateInput
    {
    public:
        /// \brief 构造函数
        /// \param opActionBehavior 罗盘旋转Action的Behavior，用于配置罗盘旋转操作行为
        /// \param handleId 罗盘旋转handle的 Id（可在CmdLocatorRotate参数中获取）
        /// \param startPoint 旋转操作起点
        /// \param bRotateLocatorOnly     是否仅旋转罗盘
        ActionLocatorRotateInput(OwnerPtr<gcmp::IActionLocatorBehavior> opActionBehavior, ElementId  handleId, const Vector3d& startPoint , bool  bRotateLocatorOnly = false);
        
        /// \brief 析构函数
        ~ActionLocatorRotateInput();

        /// \brief 获取罗盘旋转Action的Behavior
        /// \return 罗盘旋转Action的Behavior指针
        OwnerPtr<IActionLocatorBehavior> GetLocatorRotateBehavior();

        /// \brief 获取罗盘轴线Id
        /// \return 轴线Id
        ElementId GetRotateHandleId()
        {
            return m_handleId;
        }

        /// \brief 获取罗盘旋转起点
        /// \return 罗盘旋转起点
        const Vector3d& GetRotateStartPoint()
        {
            return m_startPoint;
        }

        /// \brief 是否仅旋转罗盘
        /// \return Y:true , N:false
        bool IsOnlyRotateLocator()
        {
            return m_bRotateLocatorOnly;
        }

    private:
        OwnerPtr<gcmp::IActionLocatorBehavior> m_opActionBehavior;
        ElementId  m_handleId;
        Vector3d   m_startPoint;
        bool m_bRotateLocatorOnly;
    };
}


